import { BaseEntity } from '@cool-midway/core';
import { Column, Entity } from 'typeorm';

/**
 * 文章
 */
@Entity('app_articles')
export class ArticlesEntity extends BaseEntity {
    @Column({ comment: '图片', type: 'text', nullable: true })
    images: string;

    @Column({ comment: '内容', type: 'text' })
    content: string;

    @Column({ comment: '圈子', type: 'int' })
    circleId: number;

    @Column({ comment: '标签', type: 'varchar', length: 255 })
    tagIds: string;

    @Column({ comment: '用户', type: 'int' })
    userId: number;

    @Column({ comment: '浏览量', default: 0, type: 'int' })
    views: number;

    @Column({ comment: '置顶', default: 0, type: 'tinyint' })
    isTop: number;

    @Column({ comment: '置顶结束时间', type: 'bigint', nullable: true })
    topEndTime: number;

    @Column({ comment: '状态 0:禁用 1:启用', default: 0, type: 'tinyint' })
    status: number;
}
